
import 'package:json_annotation/json_annotation.dart';
import 'package:reabampos/src/reabam/operation/db/models_cuxiao.dart';

//定义生成的文件 flutter pub run build_runner build --delete-conflicting-outputs
part 'response_cuxiao.g.dart';

@JsonSerializable(explicitToJson: true)
class ResponseShoppingCartItemPlanIds{

   String? msg;
   String? code;

   List<BeanShoppingCartItemPromotionPlanIds>? planIds;//应用
   List<BeanShoppingCartItemPromotionPlanIds>? planIds_excl;//排除

   ResponseShoppingCartItemPlanIds(
      {
         this.msg,
         this.code,
         this.planIds,
         this.planIds_excl,
      });

   //添加固定格式
   factory ResponseShoppingCartItemPlanIds.fromJson(Map<String, dynamic> json) => _$ResponseShoppingCartItemPlanIdsFromJson(json);
   Map<String, dynamic> toJson() => _$ResponseShoppingCartItemPlanIdsToJson(this);

}


@JsonSerializable(explicitToJson: true)
class BeanShoppingCartItemPromotionPlanIds{

   String? specId;
   bool? excl;
   List<String>? planIds;

   BeanShoppingCartItemPromotionPlanIds(
      {
        this.specId,
        this.excl,
        this.planIds,
      }
      );

  //添加固定格式
  factory BeanShoppingCartItemPromotionPlanIds.fromJson(Map<String, dynamic> json) => _$BeanShoppingCartItemPromotionPlanIdsFromJson(json);
  Map<String, dynamic> toJson() => _$BeanShoppingCartItemPromotionPlanIdsToJson(this);

}

@JsonSerializable(explicitToJson: true)
class ResponseShoppingCartItemPromotionJson{

   String? msg;
   String? code;

   List<BeanShoppingCartItemPromotionJson>? promotions;

  ResponseShoppingCartItemPromotionJson(
      {
        this.msg,
        this.code,
        this.promotions,
      });

  //添加固定格式
  factory ResponseShoppingCartItemPromotionJson.fromJson(Map<String, dynamic> json) => _$ResponseShoppingCartItemPromotionJsonFromJson(json);
  Map<String, dynamic> toJson() => _$ResponseShoppingCartItemPromotionJsonToJson(this);

}
@JsonSerializable(explicitToJson: true)
class BeanShoppingCartItemPromotionJson{

   String? projectId;//方案id
   String? planId;
   String? planType;
   int version=0;

   dynamic promotion;

   BeanShoppingCartItemPromotionJson(
      {
        this.projectId,
        this.planId,
        this.planType,
        this.version=0,
        this.promotion,
      });

   @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is BeanShoppingCartItemPromotionJson &&
          runtimeType == other.runtimeType &&
          projectId == other.projectId &&
          planId == other.planId &&
          planType == other.planType;

  @override
  int get hashCode => projectId.hashCode ^ planId.hashCode ^ planType.hashCode;

  //添加固定格式
  factory BeanShoppingCartItemPromotionJson.fromJson(Map<String, dynamic> json) => _$BeanShoppingCartItemPromotionJsonFromJson(json);
  Map<String, dynamic> toJson() => _$BeanShoppingCartItemPromotionJsonToJson(this);

}


@JsonSerializable(explicitToJson: true)
class ResponseShoppingCartItemTimeds{

   String? msg;
   String? code;

   String? planId;
   List<DbCXItemTimed>? itemTimeds;

   ResponseShoppingCartItemTimeds(
      {
        this.msg,
        this.planId,
        this.code,
        this.itemTimeds,
      });


  //添加固定格式
  factory ResponseShoppingCartItemTimeds.fromJson(Map<String, dynamic> json) => _$ResponseShoppingCartItemTimedsFromJson(json);
  Map<String, dynamic> toJson() => _$ResponseShoppingCartItemTimedsToJson(this);

}
@JsonSerializable(explicitToJson: true)
class ResponsOrderMutexPlans{

   String? msg;
   String? code;

    String? planId;
    List<String>? mutexPlanIds;

   ResponsOrderMutexPlans(
      {
        this.msg,
        this.planId,
        this.code,
        this.mutexPlanIds,
      });


  //添加固定格式
  factory ResponsOrderMutexPlans.fromJson(Map<String, dynamic> json) => _$ResponsOrderMutexPlansFromJson(json);
  Map<String, dynamic> toJson() => _$ResponsOrderMutexPlansToJson(this);

}
@JsonSerializable(explicitToJson: true)
class ResponseShoppingCartItemList{

   String? msg;
   String? code;

    String? bomId;

    int? PageIndex;
   int? PageCount;
   int? totalCount;
    List<dynamic>? items;

   ResponseShoppingCartItemList(
      {
        this.msg,
        this.code,
        this.bomId,
        this.PageIndex,
        this.PageCount,
        this.totalCount,
        this.items,
      });


  //添加固定格式
  factory ResponseShoppingCartItemList.fromJson(Map<String, dynamic> json) => _$ResponseShoppingCartItemListFromJson(json);
  Map<String, dynamic> toJson() => _$ResponseShoppingCartItemListToJson(this);

}
@JsonSerializable(explicitToJson: true)
class ResponseOrderPromotionJson{

   String? msg;
   String? code;

   List<BeanShoppingCartItemPromotionJson>? orderPromotions;

   ResponseOrderPromotionJson(
      {
        this.msg,
        this.code,
        this.orderPromotions,
      });


  //添加固定格式
  factory ResponseOrderPromotionJson.fromJson(Map<String, dynamic> json) => _$ResponseOrderPromotionJsonFromJson(json);
  Map<String, dynamic> toJson() => _$ResponseOrderPromotionJsonToJson(this);

}
@JsonSerializable(explicitToJson: true)
class ResponseOrderItemPromotionSpecIds{

   String? msg;
   String? code;

    List<BeanOrderItemPromotionSpecIds>? specIds_product;//商品应用
    List<BeanOrderItemPromotionSpecIds>? specIds_product_excl;//商品排除
    List<BeanOrderItemPromotionSpecIds>? specIds_group;//分类品牌系列应用
    List<BeanOrderItemPromotionSpecIds>? specIds_group_excl;//分类品牌系列排除

   ResponseOrderItemPromotionSpecIds(
      {
        this.msg,
        this.code,
        this.specIds_product,
        this.specIds_product_excl,
        this.specIds_group,
        this.specIds_group_excl,
      });


  //添加固定格式
  factory ResponseOrderItemPromotionSpecIds.fromJson(Map<String, dynamic> json) => _$ResponseOrderItemPromotionSpecIdsFromJson(json);
  Map<String, dynamic> toJson() => _$ResponseOrderItemPromotionSpecIdsToJson(this);

}
@JsonSerializable(explicitToJson: true)
class BeanOrderItemPromotionSpecIds{

   int? type; //0商品, 1分类品牌系列
   bool? excl;
   String? planId;
   List<String>? specIds;

   BeanOrderItemPromotionSpecIds(
      {
        this.type,
        this.excl,
        this.planId,
        this.specIds,
      });


  //添加固定格式
  factory BeanOrderItemPromotionSpecIds.fromJson(Map<String, dynamic> json) => _$BeanOrderItemPromotionSpecIdsFromJson(json);
  Map<String, dynamic> toJson() => _$BeanOrderItemPromotionSpecIdsToJson(this);

}




